<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>品牌添加</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="format-detection" content="telephone=no">
  <link rel="stylesheet" href="${s.base}/js/layui/css/layui.css" media="all" />
  <link rel="stylesheet" href="${s.base}/css/base/base.css" media="all" />
</head>
<body class="childrenBody">
<form class="layui-form" style="width:80%;">
  <input type="hidden" id="id" name="id" value="${brand.id}" />
  <div class="layui-form-item layui-row layui-col-xs12">
    <label class="layui-form-label">品牌名称</label>
    <div class="layui-input-block">
      <input type="text"  class="layui-input name" id="name" name="name" value="${brand.name}" placeholder="请输入品牌名称" maxlength="30" lay-verify="required">
    </div>
  </div>

  <!--<div class="layui-form-item layui-row layui-col-xs12">
    <label class="layui-form-label">分类</label>
    <div class="layui-input-block">
      <select class="form-control" id="catId">
        <#list itemCatList as itemCat>
          <option value="${itemCat.id}" <#if itemCat.id==brand.catId  >selected</#if> >${itemCat.name}</option>
        </#list>
      </select>
    </div>
  </div>-->

  <div class="layui-form-item layui-row layui-col-xs12">
    <label class="layui-form-label">LOGO</label>
    <div class="layui-input-block">
      <div class="famous-upload-pic">
        <img  <#if brand.logoImage?if_exists  >src="${brand.logoImage}"<#else>src="${s.base}/image/icon_addpic.png"</#if> class="upload-avatar" id="upload-avatar"/>
        <input type="file" name="myfiles" class="upload" id="myFile" onchange="ajaxFileUploads('myFile','logoImage','upload-avatar')">
        <input type="hidden" class="logoImage" id="logoImage" <#if brand.logoImage?if_exists  > value="${brand.logoImage}"  <#else> value="/image/icon_addpic.png" </#if> />
      </div>
    </div>
  </div>

  <div class="layui-form-item layui-row layui-col-xs12">
    <label class="layui-form-label">展示图片</label>
    <div class="layui-input-block">
      <div class="famous-upload-pic">
        <img  <#if brand.showImage?if_exists  >src="${brand.showImage}"<#else>src="${s.base}/image/icon_addpic.png"</#if> class="upload-avatar" id="upload-avatar1"/>
        <input type="file" name="myfiles" class="upload" id="myFile1" onchange="ajaxFileUploads('myFile1','showImage','upload-avatar1')">
        <input type="hidden" class="showImage" id="showImage" <#if brand.showImage?if_exists  > value="${brand.showImage}"  <#else> value="/image/icon_addpic.png" </#if> />
      </div>
    </div>
  </div>

  <div class="layui-form-item layui-row layui-col-xs12">
    <label class="layui-form-label">排序</label>
    <div class="layui-input-block">
      <input type="text" class="layui-input name" id="orderNum" name="orderNum" value="${brand.orderNum}" placeholder="请输入排序" maxlength="30" lay-verify="required">
    </div>
  </div>

  <div class="layui-form-item layui-row layui-col-xs12">
    <label class="layui-form-label">有效状态</label>
    <div class="layui-input-block">
      <input type="radio" name="status" value="1" title="有效" <#if brand.status!='2'>checked</#if>>
      <input type="radio" name="status" value="2" title="无效" <#if brand.status?if_exists&&brand.status=='2'>checked</#if>>
    </div>
  </div>

  <div class="layui-form-item layui-row layui-col-xs12">
    <div class="layui-input-block">
      <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btnSubmit">确定</button>
      <button type="reset" class="layui-btn layui-btn-sm layui-btn-primary closeLay">取消</button>
    </div>
  </div>
</form>
<script type="text/javascript" src="${s.base}/js/layui/layui.js"></script>
<script type="text/javascript" src="${s.base}/js/base/item/brandUpdateOrSave.js"></script>
<script src="${s.base}/js/base/jquery-3.2.0.min.js"></script>
<script type="text/javascript" src="${s.base}/js/base/ajaxfileupload.js"></script>
</body>
</html>